package com.example.api.utils;

import com.example.api.model.entity.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

public final class SecurityUtil {

    public static Admin getCurrentAdmin() {
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
    
}